package BookTest;

public class A1IncreaseGasoline {
    public static void main(String[] args) {
        int total = 30;
        int remainder = 6 ;
        int i = 0 ;
        while(remainder <total){
            int increase = 2;
            remainder = increase + remainder;
            i++;
            int s = i*5;
            System.out.println("已经加了"+increase+"L的汽油，当前油量"+remainder+"L,花了"+s+"秒的时间");
        }
        int s = i*5;
       System.out.println("一共花了"+s+"秒时间");
    }
}
